<?php

require('table_des_matieres.php');

?>

<fieldset>

<?php

	echo "<legend>".$language[$_SESSION['lang']]["Location"]."</legend>";
	
	if (isset($invalidTimeFormat))
	{
		echo $language[$_SESSION['lang']]["InvalidTimeFormat"];
	}
	elseif (isset($booked))
	{
		echo $language[$_SESSION['lang']]["BookedDemand"];
	}
	elseif (isset($sent))
	{
		if ($sent == true)
		{
			echo $language[$_SESSION['lang']]["SuccessDemand"];
		}
		else
		{
			echo $language[$_SESSION['lang']]["FailSendingDemand"];
		}
	}
	else
	{
	}
	
?>


<fieldset id="descriptionfieldset"><legend><?php echo $language[$_SESSION['lang']]["DemandFieldsetLegend"]; ?></legend>

<form method="POST">

	<input type="hidden" name="e-mail" />
	<input type="hidden" name="locationId" value="<?php echo $_GET['locationId']; ?>" />
	<input type="hidden" name="ownerId" value="<?php echo $_GET['ownerId']; ?>" />
	<input type="text" maxlength="255" name="nom" value="<?php echo $language[$_SESSION['lang']]["Defaultfullname"]; ?>" /><br />
	<input type="text" maxlength="255" name="mail" value="<?php echo $language[$_SESSION['lang']]["Defaultmail"]; ?>" /><br />
	
	<input id="beginLocation" type="text" maxlength="20" name="beginLocation" value="<?php echo date("Y-m-d H:i",time()); ?>" /><br />
	<input id="endingLocation" type="text" maxlength="20" name="endingLocation" value="<?php echo date("Y-m-d H:i",time()); ?>" /><br /><br />
	
	<input type="submit" name="valider" value="<?php echo $language[$_SESSION['lang']]["Valid"]; ?>" />

</form>

</fieldset>

<?php

	echo '	<fieldset id="calendarfieldset">
				<legend>'.$language[$_SESSION['lang']]["Availability"].'</legend>
				'.$calendar.'
			</fieldset></fieldset>';
			
			

require('footer.php');

?>
